﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="ViewPackage.aspx.cs" Inherits="Admin_Package_ViewPackage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <asp:Panel ID="panelInfo" runat="server" Visible="false">
        <hr />
        <div class="box_simple">
            <h1>Sender</h1>

            <div class="form">
                <div class="oneline">
                    <asp:Label ID="lblSender" runat="server" Text='<%# Package.Sender %>'></asp:Label>
                </div>
                <div class="oneline">
                    <asp:Label ID="lblSenderLocation" runat="server" Text='<%# Package.SenderLocation %>'></asp:Label>
                </div>
            </div>
        </div>
        <div class="box_simple" runat="server" id="divRoute">
            <h1>Route</h1>
            <asp:DataList ID="dlTransit" runat="server" Width="100%">
                <ItemTemplate>
                    <div class="box_transit">
                        <div class="branch_name">
                            <asp:Label ID="lblBranch" runat="server" Text='<%# Eval("CurrentBranch") %>'></asp:Label>
                        </div>
                        <div class="branch_address">
                            <asp:Label ID="lblAddress" runat="server" Text='<%# Eval("CurrentAddress") %>'></asp:Label>
                        </div>
                        <div class="branch_status">
                            <asp:Label ID="lblStatus" runat="server" Text='<%# Eval("Status").ToString()=="1" ? "Arrived" : "Pending" %>'></asp:Label>
                        </div>
                    </div>
                    <div>
                        <asp:Image ImageUrl="~/image/go-down.png" Width="50px" Style="margin-left: 60px;" runat="server" ID="imgArrow" />
                    </div>
                </ItemTemplate>
            </asp:DataList>
        </div>
        <div class="box_simple">
            <h1>Receiver</h1>
            <div class="oneline">
                <asp:Label ID="lblReceiver" runat="server" Text='<%# Package.Receiver %>'></asp:Label>
            </div>
            <div class="oneline">
                <asp:Label ID="lblReceiverLocation" runat="server" Text='<%# Package.ReceiverLocation %>'></asp:Label>
            </div>
        </div>

        <div class="box_simple">
            <div style="height: 64px; display: block;">
                <asp:Image runat="server" ID="imgPackage" ImageUrl="~/Image/package.png" Width="40px" Style="float: left; margin-right: 20px;" />
                <h1>Package Info </h1>
            </div>



            <div style="margin-left: 10px;">
                <span class="name">Parcel Type:</span>
                <asp:Label ID="lblParcelType" runat="server" Text='<%# Package.ParcelType %>'></asp:Label>

            </div>
            <div style="margin-left: 10px;">
                <span class="name">Is Fragile:</span>
                <asp:Label ID="lblFragile" runat="server" Text='<%# (Package.Fragile.HasValue && Package.Fragile.Value )? "Frigile" : "NA" %>'></asp:Label>
            </div>

            <div class="important">
                <span class="name">Weight:</span>
                <asp:Label ID="lblWeight" runat="server" Text='<%# (Package.Weight.HasValue) ? Package.Weight.Value.ToString("###.00") + " Kg" : "0 Kg" %>'></asp:Label>
            </div>
            <div class="important">
                <span class="name">Price:</span>
                <asp:Label ID="lblPrice" runat="server" Text='<%# Package.Price.HasValue ? ("$" + Package.Price.Value.ToString("###.00")) : "$0.00" %>'></asp:Label>
            </div>
            <hr />
            <div style="margin-left: 10px; margin-top: 25px;">
                <span>The package is</span><asp:Label class="important" Style="color: #00ff21" ID="lblStatus" runat="server" Text="<%# Package.Status %>"></asp:Label>
                <br />
                <br />

            </div>
            <asp:Panel ID="panelConfirm" runat="server" Style="margin-left: 10px;" Visible='<%# Package.Status=="Pending" ? true : false %>'>
            </asp:Panel>
        </div>



        <asp:Button ID="btnEdit" runat="server" Text="Edit Package" OnClick="btnEdit_Click" />
    </asp:Panel>
</asp:Content>

